package com.hd.crdao.activity;

import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.hd.crdao.R;
import com.hd.crdao.base.BaseActivity;
import com.hd.crdao.utils.SPUtils;
import com.hd.crdao.view.ExpandHeadView;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 *
 *@author Administrator
 *@date 2017/7/20 0020
 */
public class PayResultActivity extends BaseActivity {
    @BindView(R.id.head_pay_result)
    ExpandHeadView mHeadPayResult;
    @BindView(R.id.plMethod)
    TextView mPlMethod;
    @BindView(R.id.vin)
    TextView mVin;
    @BindView(R.id.plorder)
    TextView mPlorder;
    @BindView(R.id.datatime)
    TextView mDatatime;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_pay_result;
    }

    @Override
    protected void initView() {
        ButterKnife.bind(this);
    }

    @Override
    protected void initData() {
        String datatime = getIntent().getStringExtra("datatime");
        String plorder = getIntent().getStringExtra("plorder");
        String plMethod = getIntent().getStringExtra("plMethod");
        String vin = getIntent().getStringExtra("vin");
        mDatatime.setText(datatime);
        mPlorder.setText(plorder);
        mVin.setText(vin);
        if(TextUtils.equals("T",plMethod)){
            mPlMethod.setText("套餐");
        }else if(TextUtils.equals("W",plMethod)){
            mPlMethod.setText("微信支付");
        }else if(TextUtils.equals("Z",plMethod)){
            mPlMethod.setText("支付宝支付");
        }
        SPUtils.saveString("payinfo","");
    }

    @Override
    protected void initListener() {
        mHeadPayResult.getLeftArrowLL().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

}
